# An ActiveRecord example:

@events = Event.find(:all, :order => 'created_at desc', :limit => 50)
@events.each do |event|
  puts event.title
end

# Sequel model as dataset

Events.order(:created_at.DESC).limit(50).each do |event|
  puts event.title
end

# and the definition:



class Events < Sequel::Model(:events)
end

Events = Sequel.model(DB[:events])

# or...

Events = Sequel.model do
  dataset = DB[:events]
  ...
end

Events.define do
  subset :in_the_future
  
  record.has_one 
  
  define do
    has_one
  end
end